home *** CD-ROM | disk | FTP | other *** search
- /*
- * ErrorMessage.c
- * Copyright © 1993 Apple Computer Inc.
- * All Rights Reserved
- *
- * ErrorMessage.c is used for debugging. In a real application,
- * we would get strings from a resource file.
- *
- * Message.c displays a message string in an Alert.
- */
- #include <Global.h>
- #include <Constants.h>
- #include <TBUtilities.h>
- #include <CError.h>
- #include <CApplication.h>
- #include <Packages.h>
-
- extern CError *gError;
- extern CApplication *gApplication;
-
- void ErrorMessage(
- OSErr macErr,
- const StringPtr textString
- );
- void Message(
- const StringPtr textString
- );
- /*
- * ErrorMessage
- */
- void
- ErrorMessage(
- OSErr macErr,
- const StringPtr textString
- )
- {
- Str15 errorNumber;
-
- NumToString(macErr, errorNumber);
- ParamText(textString, errorNumber, "\p", "\p");
- PositionDialog('ALRT', ALRT_Exception);
- InitCursor();
- StopAlert(ALRT_Exception, NULL);
- }
-
- /*
- * Just a Message
- */
- void
- Message(
- const StringPtr textString
- )
- {
- ParamText(textString, "\p", "\p", "\p");
- PositionDialog('ALRT', ALRTgeneral);
- InitCursor();
- Alert(ALRTgeneral, NULL);
- }
-
-
-